{% url 'category-detail-view' post.category.name as category_url %}
{% url 'article-detail-view' post.en_title as article_url %}

<div class="all-post clearfix underline">
    <div class="post-title underline clearfix" style="padding-bottom: 10px;">
        <a href="{{category_url}}">
            <div class="pre-cat">
                <div class="pre-catinner btn">
                    {{post.category}} 
                </div>
                <div class="pre-catarrow">
                </div>
            </div> 
        </a>
        <h1><a href="{{article_url}}">{{post.title}}</a></h1>
    </div>

    <div class="post-content">
        <div class="row">
            <div class="col-sm-4">
                <figure class="thumbnail" style="margin-bottom: 0px; border: 1px solid #ddd; padding: 2px;">
                    <a href="{{article_url}}">
                        <img src="{{post.img}}" alt="" >
                    </a>
                </figure>
            </div>
            <div class="col-sm-8" style="position: relative; height: 166px;">
                <div class="post-tags" style="margin-bottom: 10px; width: 100%">
                    {% for tag in post.get_tagssecond%}
                        <a href="{% url 'tag-detail-view' tag%}" class="{%if forloop.counter0%}hidden-xs{%endif%} ">
                            <span class="label label-vmaig-{{forloop.counter}} btn">{{tag}}</span>
                        </a>
                    {% endfor %}
                </div>

                <div>
                    {{post.summary|safe}}
                </div>

                <div class="post-info" style="vertical-align:middle; text-align:right; height: 34px; line-height: 34px; position: absolute; right: 30px; bottom: 15px;">
                    <span>
                        <span class="glyphicon glyphicon-calendar"></span>
                        {{post.pub_time|date:"Y-m-d" }}&nbsp;&nbsp;
                    </span>
                    <span>
                        <span class="glyphicon glyphicon-comment"></span>
                        {{post.comment_set.all | length}}&nbsp;&nbsp;
                    </span>
                    <span>
                        <span class="glyphicon glyphicon-eye-open"></span>
                        {{post.view_times}}&nbsp;&nbsp;
                    </span>
                    <span>
                        <a style="color: blue;" href="{{article_url}}">阅读全文</a>
{#                        <a type="button" class="btn btn-vmaig pull-right hidden-xs"  href="{{article_url}}">阅读全文</a>#}
                    </span>
                </div>
            </div>
        </div>
    </div>

</div>
